package com.cyufeng.blog.repository;

import com.cyufeng.blog.entity.Sort;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
/**
 * 文章分类
 * @author Cyufeng
 * Data:2018.12.30
 */
@Repository
public interface SortRepository extends JpaRepository<Sort,Integer> {
//    得到所有分类
    @Query(value = "select * from sort t where t.DR ='0' and t.IS_ENABLE = '1' ",nativeQuery = true)
    List<Sort> getSort();
}
